From 4fc6880d8308b5ff69b72c23920fed75cf3f2661 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 20 Nov 2013 17:33:59 +0000 Subject: [PATCH] gtktextview: Fix a definite use of an uninitialised variable This seems to have been a typo in the original code, and allowed access to virtual_cursor_y when it was uninitialised. Found by scan-build. https://bugzilla.gnome.org/show_bug.cgi?id=712760 --- gtk/gtktextview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index a61dd1ed5e..13bade8b85 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -8787,7 +8787,7 @@ gtk_text_view_get_virtual_cursor_pos (GtkTextView *text_view, if (y) { - if (priv->virtual_cursor_x != -1) + if (priv->virtual_cursor_y != -1) *y = priv->virtual_cursor_y; else *y = pos.y + pos.height / 2; -- 2.30.2